package com.zlp.mall.modules.ums.controller;


import com.zlp.mall.common.api.R;
import com.zlp.mall.modules.ums.model.UmsMemberLevel;
import com.zlp.mall.modules.ums.service.UmsMemberLevelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 会员等级表 前端控制器
 * </p>
 *
 * @Author ZouLiPing
 * @since 2021-03-09
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/memberLevel")
@Api(value = "memberLevel", tags = "后台会员管理")
public class MemberLevelController {

    private final UmsMemberLevelService memberLevelService;


    @GetMapping(value="/list")
    @ApiOperation(value = "会员列表")
    public R list(
            @RequestParam(value="defaultStatus",defaultValue = "0") Integer defaultStatus)
    {
        List<UmsMemberLevel> list= memberLevelService.list(defaultStatus);
        return R.success(list);
    }
}

